
<p><a href="${Request.requestURL}?r=site/index">back</a></p>

<div>
	<p>
	If this is the first time you run the test, you have to initialize the database before continue.<br/>
	The database will be created in <b>${dbPath}</b>.<br/>
	 
	</p>
</div>

<div>
	<h3>Actions</h3>
	<ol>
		<li><a href="${Request.requestURL}?r=sqlite/initdb">Initialize database</a></li>
		<li>
			<form method="post" action="${Request.requestURL}?r=sqlite/insert">
				<label>Name:</label>
				<input type="text" name="name" value="" />
				<label>Occupation:</label>
				<input type="text" name="occupation" value="" />
				<input type="submit" name="insert" value="Insert row" />
			</form>
		</li>
		<li>
			<form method="post" action="${Request.requestURL}?r=sqlite/index">
				<label>Name:</label>
				<input type="text" name="name" value="" />
				<label>Occupation:</label>
				<input type="text" name="occupation" value="" />
				<input type="submit" name="query" value="Query" />
			</form>
		</li>
	</ol>
</div>

<div>
	<h3>Data</h3>
	<table>
	<tr><th>Id</th><th>Name</th><th>Occupation</th><th></th></tr>
	{for row in data}
		<tr>
			<td>${row.id}</td>
			<td>${row.name}</td>
			<td>${row.occupation}</td>
			<td><a href="${Request.requestURL}?r=sqlite/remove&id=${row.id}">Remove</a></td>
		</tr>
	{/for}
	</table>
</div>